<?php
/**
 * Created by PhpStorm.
 * User: lijie
 * Date: 2018/10/31
 * Time: 16:12
 */
namespace app\api\validate;

use think\Validate;

class Orderupto extends Validate{

    protected $rule = [
        'id'            => ['require','number'],
        'u_id'          => ['require','number'],
        'a_id'          => ['require','number'],
        'cardnumber'    => ['require','regex'=>'/^[0-9]{16}$/'],
        'wallet'        => ['require','number'],
        'pagenum'       => ['require'],
        'listNum'       => ['require']
    ];

    protected $message = [
        'id'            => 'id参数错误',
        'u_id'          => 'u_id参数错误',
        'a_id'          => 'a_id参数错误',
        'cardnumber'    => 'cardnumber参数错误',
        'wallet'        => 'wallet参数错误',
        'pagenum'       => 'pagenum参数错误',
        'listNum'       => 'listNum参数错误'
    ];

    protected $scene = [
        // 编辑一卡通
        'editOnecard'       => ['id','wallet'],
        // 一卡通列表
        'orderuptoList'       => ['pagenum','listNum'],
        //一卡通充值记录
        'selectUptorecord'  => ['u_id']
    ];
}